package ru.magicreader.server;

import java.io.IOException;
import java.util.logging.Logger;

import javax.jdo.PersistenceManager;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MigrationServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private static Logger log = Logger.getLogger(MigrationServlet.class.getName());
	private PersistenceManager persistenceManager;

	@Override
	public void init(ServletConfig config) throws ServletException {
		persistenceManager = PersistenceFacade.getInstance().getPersistenceManager();
	}

	@Override
	public void destroy() {
		persistenceManager.close();
	}
	
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		log.warning("Nothing to migrate");
	}
}
